/*
 * @Description: 
 * @Author: xjlzs
 * @Date: 2021-10-15 13:46:13
 * @LastEditTime: 2021-10-15 14:05:48
 * @LastEditors: xjlzs
 */
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state:{
        appName:'demo'
    },
    getters:{
        getState:(state)=>(param)=>{
            return state[param];
        }
    },
    actions:{
        setState:(context,obj)=>{
            context.commit('setState',obj);
        }
    },
    mutations:{
        setState:(state,obj)=>{
            state[obj.name]=obj.value;
        }
    },
    modules:{
        
    }
})